package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the PARTIDA_RMC database table.
 * 
 */
@Entity
@Table(name="PARTIDA_RMC")
public class PartidaRmc implements Serializable {
	private static final long serialVersionUID = 1L;
	private PartidaRmcPK id;
	private String agntSync;
	private Date tsUltSync;
	private Partida partida1;
	private Partida partida2;

    public PartidaRmc() {
    }


	@EmbeddedId
	public PartidaRmcPK getId() {
		return this.id;
	}

	public void setId(PartidaRmcPK id) {
		this.id = id;
	}
	

	@Column(name="AGNT_SYNC", length=4)
	public String getAgntSync() {
		return this.agntSync;
	}

	public void setAgntSync(String agntSync) {
		this.agntSync = agntSync;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_ULT_SYNC")
	public Date getTsUltSync() {
		return this.tsUltSync;
	}

	public void setTsUltSync(Date tsUltSync) {
		this.tsUltSync = tsUltSync;
	}


	//bi-directional many-to-one association to Partida
    @ManyToOne
	@JoinColumn(name="REFNUM_PART_NUEVO", nullable=false, insertable=false, updatable=false)
	public Partida getPartida1() {
		return this.partida1;
	}

	public void setPartida1(Partida partida1) {
		this.partida1 = partida1;
	}
	

	//bi-directional many-to-one association to Partida
    @ManyToOne
	@JoinColumn(name="REFNUM_PART_ANTIGUO", nullable=false, insertable=false, updatable=false)
	public Partida getPartida2() {
		return this.partida2;
	}

	public void setPartida2(Partida partida2) {
		this.partida2 = partida2;
	}
	
}